{{useCss "/app-pages/css/pc/main/ad.scss"}}
<div class="pagetitle">首页广告</div>
<div class="box">
	<div class="accept">
		<button disabled="{{$Cache.main.ad.banner.isadding}}" onclick="javascript:document.getElementById('adinput').click()">{{$Cache.main.ad.banner.isadding?"正在上传":"选择图片上传"}}</button>
		<span>(建议尺寸1920*650，单位：像素）</span>
	</div>
	<input event-change="{{'$Event.main.ad.upload'}}" type="file" style="display: none" accept="image/*" id="adinput" />
	<div class="adbox">
		{{#if !$Cache.main.ad.banner_list.length}}
		<p>暂无图片</p>
		{{/if}}
		{{#each $Cache.main.ad.banner_list}}
		<div class="aditem">
			<img src="{{url}}?imageView2/1/w/500/h/170" alt="" />
			<div class="admethod">
				<button event-click="{{'$Top.$Event.main.ad.removeAd'}}">删除</button>
			</div>
		</div>
		{{/each}}
	</div>
</div>
